import { createContext } from 'react'

const DemoContext = createContext({})
DemoContext.displayName = 'DemoContext'

export default DemoContext


export const WithDemoContext = (C) => {
  return (props) =>
    <DemoContext.Consumer>
      {(context) => <C {...context} {...props} />}
    </DemoContext.Consumer>

}